﻿<!-- Copyright © LECO Corporation 2009-2013.  All Rights Reserved. -->

<Application x:Class="CornerstoneRemoteControlClient.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             Startup="App_OnStartup">
    <Application.Resources>
        
        <Style x:Key="HeaderText" TargetType="{x:Type TextBlock}">
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
        </Style>

        <Style x:Key="HeaderText14" TargetType="{x:Type TextBlock}">
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="FontSize" Value="14"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
        </Style>

        <Style x:Key="HeaderText14Box" TargetType="{x:Type TextBox}">
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="FontSize" Value="14"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
            <Setter Property="IsReadOnly" Value="True"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
        </Style>

        <Style x:Key="HeaderText16" TargetType="{x:Type TextBlock}">
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="FontSize" Value="16"></Setter>
            <Setter Property="TextWrapping" Value="Wrap"/>
        </Style>

        <Style x:Key="HeaderText16Box" TargetType="{x:Type TextBox}">
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="FontSize" Value="16"></Setter>
            <Setter Property="TextWrapping" Value="Wrap"/>
            <Setter Property="IsReadOnly" Value="True"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
        </Style>

        <Style x:Key="SyntaxText" TargetType="{x:Type TextBox}">
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
        </Style>

        <Style x:Key="ErrorText" TargetType="{x:Type TextBlock}">
            <Setter Property="Foreground" Value="Red"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
        </Style>

        <Style x:Key="DescriptionText" TargetType="{x:Type TextBlock}">
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
        </Style>

        <Style x:Key="DescriptionTextBox" TargetType="{x:Type TextBox}">
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
            <Setter Property="IsReadOnly" Value="True"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
        </Style>
        
        <Style x:Key="TrafficStyle">
            <Setter Property="TextBox.Background" Value="Transparent"/>
            <Setter Property="TextBox.TextWrapping" Value="Wrap"/>
            <Setter Property="TextBox.Foreground" Value="AntiqueWhite" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding Direction}" Value="IN">
                    <Setter Property="TextBox.Foreground" Value="Green" />
                </DataTrigger>
            </Style.Triggers>
        </Style>

        <BooleanToVisibilityConverter x:Key="BoolToVisibility"/>

        <!-- Borrowed from http://mark-dot-net.blogspot.com/2009/09/circular-wpf-button-template.html -->
        <Style x:Key="MyFocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Control}">
                        <Grid Margin="8">
                            <Ellipse                    
                                Name="r1"                    
                                Stroke="Black"                    
                                StrokeDashArray="2 2"                    
                                StrokeThickness="1"/>
                            <Border                    
                                Name="border"                    
                                Width="{TemplateBinding ActualWidth}"                    
                                Height="{TemplateBinding ActualHeight}"                    
                                BorderThickness="1"                    
                                CornerRadius="2"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <!-- Borrowed from http://mark-dot-net.blogspot.com/2009/09/circular-wpf-button-template.html -->
        <Style x:Key="CircleButton" TargetType="Button">
            <Setter Property="OverridesDefaultStyle" Value="True"/>
            <Setter Property="Margin" Value="2"/>
            <Setter Property="FocusVisualStyle" Value="{StaticResource MyFocusVisual}"/>
            <Setter Property="Background" Value="#FF6DB4EF"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <Ellipse Fill="{TemplateBinding Background}"/>
                            <Ellipse>
                                <Ellipse.Fill>
                                    <RadialGradientBrush>
                                        <GradientStop Offset="0" Color="#00000000"/>
                                        <GradientStop Offset="0.88" Color="#00000000"/>
                                        <GradientStop Offset="1" Color="#80000000"/>
                                    </RadialGradientBrush>
                                </Ellipse.Fill>
                            </Ellipse>
                            <Ellipse Margin="10" x:Name="highlightCircle" >
                                <Ellipse.Fill >
                                    <LinearGradientBrush >
                                        <GradientStop Offset="0" Color="#50FFFFFF"/>
                                        <GradientStop Offset="0.5" Color="#00FFFFFF"/>
                                        <GradientStop Offset="1" Color="#50FFFFFF"/>
                                    </LinearGradientBrush>
                                </Ellipse.Fill>
                            </Ellipse>
                            <ContentPresenter x:Name="content" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter TargetName="highlightCircle" Property="Fill">
                                    <Setter.Value>
                                        <LinearGradientBrush StartPoint="0.3,0" EndPoint="0.7,1">
                                            <GradientStop Offset="0" Color="#50FFFFFF"/>
                                            <GradientStop Offset="0.5" Color="#00FFFFFF"/>
                                            <GradientStop Offset="1" Color="#50FFFFFF"/>
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter TargetName="content" Property="RenderTransform">
                                    <Setter.Value>
                                        <TranslateTransform Y="0.5" X="0.5"/>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </Application.Resources>
</Application>
